package com.foreknow.service.impl;

import com.foreknow.dao.SettlecategoryMapper;
import com.foreknow.entity.Settlecategory;
import com.foreknow.service.SettlecategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class SettlecategoryImpl implements SettlecategoryService {
    @Autowired
    private SettlecategoryMapper settlecategoryMapper;
    @Override
    public List<Settlecategory> getQueryAllSettlecategory() {
        return settlecategoryMapper.findSettlecategory();
    }

    @Override
    public int addSettlecategory(Settlecategory settlecategory) {
        return settlecategoryMapper.insertSelective(settlecategory);
    }

    @Override
    public int deleteSettlecategory(int id) {
        return settlecategoryMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int updateSettlecategory(Settlecategory settlecategory) {
        return settlecategoryMapper.updateByPrimaryKeySelective(settlecategory);
    }

    @Override
    public Settlecategory selectSettlecategory(Integer id) {
        return settlecategoryMapper.selectByPrimaryKey(id);
    }
}